import java.util.Arrays;

public class EnumTest {

	public enum Xxx {
		XX("xx"), YY("yy");
		private String name;
		private Xxx(String name) {
			this.name = name;
		}
		@Override public String toString() {
			return this.name;
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		System.out.println( Arrays.toString( Xxx.values() ) );
		System.out.println( Xxx.XX.ordinal() );
		System.out.println( Xxx.XX.name() );
		System.out.println( Xxx.XX.toString() );
	}
}